import request from '@/utils/request'
import axios from 'axios'


export const add = function(params){
  return request({
    url: '/instructions/add',
    method: 'post',
    data: params,
  })
}

export const list = function(params){
  return request({
    url: '/instructions/list',
    method: 'get',
    params: params,
  })
}


export const editGet = function(params){
  return request({
    url: '/instructions/edit',
    method: 'get',
    params: params,
  })
}

export const editPost = function(params){
  return request({
    url: '/instructions/edit',
    method: 'post',
    data: params,
  })
}

export const del = function(params){
  return request({
    url: '/instructions/del',
    method: 'post',
    data: params,
  })
}

export const exportData = function(params){
  return request({
    url: '/instructions/export_url',
    method: 'get',
    params: params,
  })
}


export const typeList = function(params){
  return request({
    url: '/instructions/instructions_type_list',
    method: 'get',
    params: params,
  })
}


export const importData = function(params){
  return axios.post('/api/api/instructions/import', params)
}



export const allInstructionsTypeList = function(params){
  return request({
    url: '/instructions/all_instructions_type_list',
    method: 'get',
    params: params,
  })
}
